import { xunfeiSendMsg } from './xunfei.js';
import {FileBox} from "file-box";

export async function getXunfeiReply(prompt, name) {
    console.log('🚀🚀🚀 / 向讯飞AI发送信息', prompt);
    let reply;
    if (prompt.includes('帅')) {
        prompt = '用几句话来形容一个名为老呆的人很帅。';
    }
    reply = await xunfeiSendMsg(prompt);
    // reply = await xunfeiSendMsg(prompt);
    if (typeof name != 'undefined') {
        reply = `@${name}\n ${reply}`;
    }
    const fileBox = FileBox.fromUrl('https://wechaty.github.io/wechaty/images/bot-qr-code.png')
    return `${reply}`;
}
